package com.tom.learnbase;

import com.tom.contants.Contants;
import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.junit.jupiter.api.Test;

import static dev.langchain4j.model.openai.OpenAiModelName.GPT_3_5_TURBO;
import static java.time.Duration.ofSeconds;


/**
 * 包含所有的模型
 * dev.langchain4j.model.openai.OpenAiModelName.GPT_3_5_TURBO
 *
 *
 *
 *     public static final String GPT_3_5_TURBO = "gpt-3.5-turbo";
 *     public static final String GPT_3_5_TURBO_0301 = "gpt-3.5-turbo-0301";
 *     public static final String GPT_3_5_TURBO_0613 = "gpt-3.5-turbo-0613";
 *     public static final String GPT_3_5_TURBO_1106 = "gpt-3.5-turbo-1106";
 *     public static final String GPT_3_5_TURBO_16K = "gpt-3.5-turbo-16k";
 *     public static final String GPT_3_5_TURBO_16K_0613 = "gpt-3.5-turbo-16k-0613";
 *     public static final String GPT_4 = "gpt-4";
 *     public static final String GPT_4_0314 = "gpt-4-0314";
 *     public static final String GPT_4_0613 = "gpt-4-0613";
 *     public static final String GPT_4_32K = "gpt-4-32k";
 *     public static final String GPT_4_32K_0314 = "gpt-4-32k-0314";
 *     public static final String GPT_4_32K_0613 = "gpt-4-32k-0613";
 *     public static final String GPT_4_1106_PREVIEW = "gpt-4-1106-preview";
 *     public static final String GPT_4_VISION_PREVIEW = "gpt-4-vision-preview";
 *     public static final String GPT_3_5_TURBO_INSTRUCT = "gpt-3.5-turbo-instruct";
 *     public static final String TEXT_EMBEDDING_ADA_002 = "text-embedding-ada-002";
 *     public static final String TEXT_MODERATION_STABLE = "text-moderation-stable";
 *     public static final String TEXT_MODERATION_LATEST = "text-moderation-latest";
 *     public static final String DALL_E_2 = "dall-e-2"; 文本到图像
 *     public static final String DALL_E_3 = "dall-e-3";
 *
 *
 *
 *
 */
public class OpenAiChatModelTest {


    @Test
    public void testMoreParam(){
        ChatLanguageModel model = OpenAiChatModel.builder()
                .apiKey(Contants.key)
                .modelName(GPT_3_5_TURBO)
                .temperature(0.3)
                .timeout(ofSeconds(60))
                .logRequests(true)
                .logResponses(true)
                .build();
    }
}
